package org.neuedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.neuedu.entity.Scheduling;
import org.neuedu.mapper.SchedulingMapper;
import org.neuedu.service.SchedulingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lzw
 * @since 2024-11-07
 */
@Service
public class SchedulingServiceImpl extends ServiceImpl<SchedulingMapper, Scheduling> implements SchedulingService {

    @Override
    @Cacheable(value = "admin",key = "'scheduling'")
    public List<Scheduling> getActive() {
        QueryWrapper<Scheduling> wrapper = new QueryWrapper<>();
        wrapper.eq("delmark", 1);
        return this.list(wrapper);
    }
}
